package com.p2p.auth.domain.entity;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
/**
 * Created by Antinomy on 17/7/26.
 */
@Entity
@Table(name ="t_user_assign_role")
@DynamicInsert
@DynamicUpdate
@EntityListeners(AuditingEntityListener.class)
@Data
public class UserAssignRole extends IdEntity {

    private static final long serialVersionUID = -9092780623155166736L;
    @Column(columnDefinition = "varchar(50) NOT NULL comment '用户ID'")
    private String userId;

    @Column(columnDefinition = "varchar(50) NOT NULL comment '角色ID'")
    private String roleId;
}
